package tutorial.gae;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;


@Path("/")
public class IndexService {
	@Path("index.htm")
	@GET
	@Produces(MediaType.TEXT_HTML)
	
	public String renderPage(@QueryParam("say") String say) {
		return "<html><body><h1>hello," + say + " World</h1></body></html>";
	}
	
	@Path("greeting/{hello}")
	@GET
	@Produces(MediaType.TEXT_PLAIN)
	public String sayhello( @PathParam("hello") String hello){
		return "Say " + hello;
	}

}
